package com.niiwoo.civet.account.enums;/**
 * Created by DELL on 2017/12/5.
 */

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 提现订单状态枚举
 *
 * @author xiaoyingping
 * @create 2017-12-05 17:53
 **/
@AllArgsConstructor
@Getter
public enum WithholdOrderStatusEnum {
    HANDLING((byte)1,"处理中"),
    SUCCESS((byte)2,"成功"),
    FAIL((byte)3,"失败");

    private byte value;
    private String desc;


    public static WithholdOrderStatusEnum getEnumByCode(byte enumCode) {
        if (Objects.nonNull(enumCode)) {
            for (WithholdOrderStatusEnum retEnum : WithholdOrderStatusEnum.values()) {
                if (enumCode == retEnum.value) {
                    return retEnum;
                }
            }
        }
        return null;
    }

}
